home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / lib / mntlib44.zoo / mntlib / fsetpos.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-01  |  283 b   |  23 lines

  1. /* from Dale Schumacher's dLibs */
  2.  
  3. #include <stdio.h>
  4.  
  5. int
  6. fsetpos(fp, pos)
  7.   FILE *fp;
  8.   fpos_t *pos;
  9. {
  10.   register long rv;
  11.  
  12.   if (pos)
  13.   {
  14.     rv = fseek(fp, *pos, SEEK_SET);
  15.     if (rv >= 0)
  16.     {
  17.       fp->_flag &= ~(_IOEOF|_IOERR);
  18.       return (0);
  19.     }
  20.   }
  21.   return (-1);
  22. }
  23.